package com.cancan.cloud.shop.utils;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class LogBaseContractValue {

    public final static String KEY_OF_ID = "log-id";
    public static String LOG_CENTER_SERVER = "logcenter";
    public final static String KEY_OF_LOG_LIST = "requestList";
    public final static String KEY_OF_MICROSERVICE = "serviceName";
    public static String SERVER_PATH = "/logs";

    @Value("${hjmos.log.serviceName:logcenter}")
    public void setLogCenterServer(String name) {
        if (StringUtils.isNotEmpty(name)) {
            LOG_CENTER_SERVER = name;
        }
    }

    @Value("${hjmos.log.servicePath:/logs}")
    public void setServerPath(String path) {
        if (StringUtils.isNotEmpty(path)) {
            SERVER_PATH = path;
        }
    }
}